package com.xyzwps.navia.user;


import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;

@RestController
public class UserController {

    @GetMapping("/users/{id}")
    public User getById(@PathVariable("id") Long id) {
        return new User(id,
                "Id-" + id,
                "144" + StringUtils.leftPad("" + id, 8, "0"),
                LocalDateTime.now());
    }
}
